package com.momo.seckilling.dao;

import com.momo.seckilling.entity.UserInfo;
import com.momo.seckilling.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Created by li on 2019/2/2.
 */
@Component
public class UserDao {

    @Autowired
    private UserMapper userMapper;

    public UserInfo findUserByid(int userid){
        return userMapper.findUserByid(userid);
    }
    public void saveUserInfo(UserInfo userinfo){
        userMapper.saveUserInfo(userinfo);
    }

    public UserInfo findUserByAccount(String account){
       return userMapper.findUserByAccount(account);
    }
}
